#include <cstdio>
#include <algorithm>

using namespace std;

typedef long long ll;
const int maxn = 300000, mods = 998244353, maxlen=60;

class Trie {
public:
  ll v[maxn * 64+1];
  int n = 1, s[maxn * 64+1][2];

  void ins(int o, ll x, ll l, int tv) {
    if (l >= 0) {
      int t = (x >> l) & 1;
      if (!s[o][t])
        s[o][t] = ++n;
      ins(s[o][t], x, l - 1, tv);
    }
    v[o] = (v[o] + tv) % mods;
  }

  ll sum(int o, ll x, ll k, int l) {
    ll ret = 0;
    if (l >= 0) {
      int a = (x >> l) & 1, b = (k >> l) & 1;
      if (b) {
        if (s[o][!a])
          ret = sum(s[o][!a], x, k, l - 1);
      } else {
        ret = (v[s[o][!a]] + (s[o][a] ? sum(s[o][a], x, k, l - 1) : 0)) % mods;
      }
    } else ret = v[o];
    return ret;
  }
};

int main() {
  freopen("xor.in", "r", stdin);
  freopen("xor.out", "w", stdout);

  static ll a[maxn + 1];
  int n;
  ll x;
  scanf("%d %lld", &n, &x);
  for (int i = 1; i <= n; i++)
    scanf("%lld", a + i);
  sort(a+1, a+n+1);

  static Trie trie;
  ll ans=0;
  for (int i=1; i<=n; i++) {
    ll f=(trie.sum(1, a[i], x, maxlen)+1)%mods;
    ans = (ans+f)%mods;
    trie.ins(1, a[i], maxlen, f);
  }
  printf("%lld\n", ans);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
